﻿using Loki.UI.Wpf;

namespace Luna.UI.Contacts.Wpf
{
    /// <summary>
    /// Logique d'interaction pour AccountListView.xaml
    /// </summary>
    public partial class AccountListView : ViewControl<AccountListViewModel>
    {
        public AccountListView()
        {
            InitializeComponent();
        }

        private void TableView_RowDoubleClick(object sender, DevExpress.Xpf.Grid.RowDoubleClickEventArgs e)
        {
            if (e.HitInfo.InColumnHeader == false
                && e.HitInfo.InColumnPanel == false
                && e.HitInfo.InFilterPanel == false
                && e.HitInfo.InGroupColumn == false
                && e.HitInfo.InGroupPanel == false
                && e.HitInfo.InRow == true)
            {
                DisplayableAccount L_Account = GRD_Accounts.GetRow(e.HitInfo.RowHandle) as DisplayableAccount;
                ApplicationCommands.OPEN.Execute(L_Account.Account);
            }
        }
    }
}
